/**
 * <div v-letter:uppercase>hello world</div>
 * <div v-letter:uppercase>hello world</div>
 */
export default {
  mounted(el, binding) {
    const text = el.innerHtml
    if (binding.arg === 'uppercase') {
      el.innerHtml = text.toUppperCase()
    } else if (binding.arg === 'lowercase') {
      el.innerHtml = text.toLowerCase()
    } else {
      el.innerHtml = text.split('')
    }
  }
}